﻿<UserControl x:Class="GTServices.WPF.Client.Views.DirectoryFilterView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:contr="clr-namespace:GTServices.WPF.Client.Controls"
             xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <DockPanel>
        
        <StackPanel DockPanel.Dock="Bottom">
            <Label Content="Filter: " />
            <DockPanel>
                <contr:ClickableLabel Text="Add" cal:Message.Attach="[Event Click] = [Action Add]" DockPanel.Dock="Right" />
                <TextBox DockPanel.Dock="Left" Text="{Binding Filter, UpdateSourceTrigger=PropertyChanged}" /> 
            </DockPanel>
        </StackPanel>

        <ListView ItemsSource="{Binding DirectoryFilters}" SelectedItem="{Binding SelectedItem}">
            <ListView.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Remove" cal:Message.Attach="[Event Click]=[Action Remove]" /> 
                </ContextMenu>
            </ListView.ContextMenu>
        </ListView>


    </DockPanel>
</UserControl>
